package com.example.auth.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.auth.constant.DataSourceKey;
import com.example.auth.model.domain.SysUserRoleMapping;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户-角色 关系表 Mapper 接口
 * </p>
 *
 * @author xijie.wang
 * @since 2022-04-11
 */
public interface SysUserRoleMappingMapper extends BaseMapper<SysUserRoleMapping> {

	@DS(DataSourceKey.SLAVE)
	@Select("SELECT * FROM t_channel_role_mapping WHERE userId=#{userId} and deleted=0 LIMIT 1")
	SysUserRoleMapping selectByUserId(Integer userId);
}
